package com.xuanyuan.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
public class Notice {
    private Integer id;

    @NotBlank(message = "公告标题不能为空")
    @Size(min = 0, max = 20, message = "公告标题长度不能超过20个字符")
    private String title;
    private String content;
    private Integer userId;
    private String username;
    private String nickname;
    @Size(min = 0, max = 500, message = "备注长度不能超过500个字符")
    private String remark;
    private String status;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date updateTime;
}
